﻿@model HanGu.Entity.MemberContract
@{
    Layout = null;
    ViewBag.Title = "客户合同管理";
    var Parents = ViewData["Parents"] as SelectList;
    var SelectedParents = new List<string>();
    if (!string.IsNullOrEmpty(Model.Creator))
    {
        SelectedParents = Model.Creator.Split(',').ToList();
    }
}
<div class="pageContent">
    <form method="post" id="@ViewData["CurrentController"]Form" action="CustomerInfo/MemberContract/create?OpID=@ViewData["OperateID"]" class="pageForm required-validate"
    onsubmit="return validateCallback(this, mydialogAjaxDone);">
    @Html.ValidationSummary(true)
    @Html.HiddenFor(model => model.ID)
    @Html.HiddenFor(model => model.ParentID)
    <div class="pageFormContent" layouth="78">
        <p>
            <label>
                日期：</label>
            @Html.TextBoxFor(model => model.StarDate, new { @class = "date required", format = "yyyy-MM-dd", @readonly = "true" })
            @Html.ValidationMessageFor(model => model.StarDate)
        </p>
        <p>
            <label>
                金额：</label>
            @Html.TextBoxFor(model => model.Amount, new { @class = "required float" })
            @Html.ValidationMessageFor(model => model.Amount)
        </p>
        <p style="width: 100%; height: 180px">
            <label>
                内容：</label>
            @Html.TextAreaFor(model => model.Remark, new { @class = "TextArea", cols = "70", rows = "10" })
            @Html.ValidationMessageFor(model => model.Remark)
        </p>
        <p style="width: 100%;">
            <label>
                负责人：</label>
            @foreach (var item in Parents)
            {
                <input name="Creator" class="checkbox required" id="Creator" style="magin-left: 5px;" type="checkbox" CHECKED="@SelectedParents.Contains((item.Value))" value="@item.Value"/>
                @item.Text
            }
            @Html.ValidationMessageFor(model => model.Creator)</p>
    </div>
    <div class="formBar">
        <ul>
            <li>
                <div class="buttonActive">
                    <div class="buttonContent">
                        <button type="submit">
                            提交</button></div>
                </div>
            </li>
            <li>
                <div class="button">
                    <div class="buttonContent">
                        <button type="button" class="close">
                            取消</button></div>
                </div>
            </li>
        </ul>
    </div>
    </form>
</div>
